package cn.school.dao;

import cn.school.entity.Student;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface StudentMapper {

    public int checkPhone(String phone);

    public Student get(long stuno);
    public int update(Student stu);
    public int add(Student stu);
    /**
     * 修改密码。
     * arg0,arg1,arg2,param0,param1...9
     *
     * @param stuno
     * @param newPass
     * @return
     */
    public int updatePass(@Param("stuno") long stuno, @Param("pass") String newPass);

    public List<Student> search(@Param("pageNo") int pageNo, @Param("pageSize") int pageSize, @Param("sname") String sname, @Param("qq") String qq, @Param("phone") String phone, @Param("enterStart") Date enterStart, @Param("enterEnd") Date enterEnd);

    public int searchTotal(@Param("sname") String sname, @Param("qq") String qq, @Param("phone") String phone, @Param("enterStart") Date enterStart, @Param("enterEnd") Date enterEnd);
 }
